import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
const morgan = require('morgan')


async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.use(morgan('tiny'))
  const options = new DocumentBuilder()
    .setTitle('PTT example')
    .setDescription('The PTT API description')
    .setVersion('0.01')
    .addTag('PTT')
    .build();
  const document = SwaggerModule.createDocument(app, options);
  SwaggerModule.setup('example', app, document);

  await app.listen(3000);
}
bootstrap();
